<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>信息管理 - <s:text name="context.title"/></title>
	<%@ include file="/common/meta.jsp" %>
	
	<script>
		$(document).ready(function() {
			//聚焦第一个输入框
			$("#infoTitle").focus();
			//为inputForm注册validate函数
			$("#inputForm").validate({
				rules: {
				      infoTitle: {
						required: true,
						remote: "info!checkInfoTitle.action" 
					},
					infoTitle: "required",
					password: {
						required: true,
						minlength:3
					}
				},
				messages: {
					infoTitle: {
						remote: "请填写信息标题"
					},
					
				}
			});
		});
	</script>
</head>

<body>
	<h1 class="title01"><img src="${ctx}/images/02_15.gif" width="45" height="42" class="fl"/><a href="#">更多</a><s:if test="id == null">创建</s:if><s:else>修改</s:else> 公告信息</h1>
	<form id="inputForm" action="info!save.action" method="post" enctype="multipart/form-data"> 
	<fieldset class="fs_ys">
		<legend><s:if test="id == null">创建</s:if><s:else>修改</s:else>信息 </legend>
	    
	    <p>信息标题:<input type="text" name="infoTitle" class="input_ys1" size="105" id="infoTitle" value="${infoTitle}"/></p>
		<p>信息内容:<textarea rows="5" class="input_ys1" cols="80" name="infoContent"  title="">${infoContent }</textarea></p>
		<p>附&nbsp;&nbsp;&nbsp;&nbsp;件:<input type="file" name="uploadFile" class="input_ys1" id="uploadFile"  /></p>
		<p><security:authorize ifAnyGranted="ROLE_信息维护">
						<input class="button" type="submit" value="提交" onclick="return confirm('确定提交?')"/>&nbsp;
					</security:authorize>
					<input class="button" type="button" value="返回" onclick="history.back()"/>
		</p>		
	</fieldset>
		<input type="hidden" name="id" value="${id}"/>		
	</form>
</body>
</html>
